<%--
  Created by IntelliJ IDEA.
  User: taoying147258zlx
  Date: 2020/10/8
  Time: 23:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>皇家大学</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/client/css/style1.css" type="text/css" media="all"/>
    <script src="${pageContext.request.contextPath}/static/client/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript">
        //图片滚动 调用方法 imgscroll({speed: 30,amount: 1,dir: "up"});
        $.fn.imgscroll = function(o){
            var defaults = {
                speed: 40,
                amount: 0,
                width: 1,
                dir: "left"
            };
            o = $.extend(defaults, o);

            return this.each(function(){
                var _li = $("li", this);
                _li.parent().parent().css({overflow: "hidden", position: "relative"}); //div
                _li.parent().css({margin: "0", padding: "0", overflow: "hidden", position: "relative", "list-style": "none"}); //ul
                _li.css({position: "relative", overflow: "hidden"}); //li
                if(o.dir == "left") _li.css({float: "left"});

                //初始大小
                var _li_size = 0;
                for(var i=0; i<_li.size(); i++)
                    _li_size += o.dir == "left" ? _li.eq(i).outerWidth(true) : _li.eq(i).outerHeight(true);

                //循环所需要的元素
                if(o.dir == "left") _li.parent().css({width: (_li_size*3)+"px"});
                _li.parent().empty().append(_li.clone()).append(_li.clone()).append(_li.clone());
                _li = $("li", this);

                //滚动
                var _li_scroll = 0;
                function goto(){
                    _li_scroll += o.width;
                    if(_li_scroll > _li_size)
                    {
                        _li_scroll = 0;
                        _li.parent().css(o.dir == "left" ? { left : -_li_scroll } : { top : -_li_scroll });
                        _li_scroll += o.width;
                    }
                    _li.parent().animate(o.dir == "left" ? { left : -_li_scroll } : { top : -_li_scroll }, o.amount);
                }

                //开始
                var move = setInterval(function(){ goto(); }, o.speed);
                _li.parent().hover(function(){
                    clearInterval(move);
                },function(){
                    clearInterval(move);
                    move = setInterval(function(){ goto(); }, o.speed);
                });
            });
        };
        //友情链接下拉框跳转弹出新窗口
        function frlink(selObj){
            window.open(selObj.options[selObj.selectedIndex].value);}
    </script>
</head>

<body>
<div id="hearder2" class="clearfix">
    <div class="logo">
        <img src="${pageContext.request.contextPath}/static/client/images/z_logo1.png">
    </div>
    <div class="logo-name">皇家大学</div>
    <div class="form-tools">
        <form id="search" name="search" method="post">
            <div class="tools-link">
                <span target="_blank">皇家大学，欢迎您</span>
            </div>

            <div class="search-box">
                <input type="text" name="textfield" id="textfield" class="input-text" placeholder="请输入搜索关键词">
                <input type="image" src="${pageContext.request.contextPath}/static/client/images/search.png" class="input-submit" />
            </div>
        </form>
    </div>
</div>
<div id="menu-box" class="clearfix">
    <ul>
        <li><a href="http://localhost:8080/hjxy9/client/getView">首页</a></li>
        <li><a href="http://localhost:8080/hjxy9/client/detail">中心概况</a></li>
        <li><a href="http://localhost:8080/hjxy9/client/list">师资队伍</a></li>
        <li><a href="list-pic1.html">设备资源</a></li>
        <li><a href="detail1.html">教学模式</a></li>
        <li><a href="form1.html">网上教学</a></li>
        <li><a href="list-text1.html">新闻中心</a></li>
        <li><a href="list-text1.html">创新成果</a></li>
        <li><a href="detail1.html">联系我们</a></li>
    </ul>
</div>
<div id="slider-box" style="background:url(${pageContext.request.contextPath}/static/client/images/slider1.jpg) center center;"></div>
<!-- index1-div1 -->
<div id="index1-div1" class="clearfix">
    <div class="index1-left675">
        <div class="title-box">中心简介<a href="detail1.html" class="title-more" title="查看更多"><img src="${pageContext.request.contextPath}/static/client/images/12.gif"></a></div>
        <p><img src="${pageContext.request.contextPath}/static/client/images/z_logo.png" align="left">皇家大学1983年经国家教育部批准设立。中央、教育部和地方高度重视特区大学建设。北大援建中文、外语类学科，清华援建电子、建筑类学科，人大援建经济、法律类学科，一大批知名学者云集深圳大学。建校伊始，学校在高校管理体制,北大援建中文、外语类学科，清华援建电子、建筑类学科，人大援建经济北大援建中文、外语类学科，建筑类学科，人大援建经济北大援建中文、外语类学科，清华援建电子...<a href="detail1.html">查看更多...</a></p>
    </div>
    <div class="index1-right300">
        <div class="title-box">通知公告<a href="list-text1.html" class="title-more" title="查看更多"><img src="${pageContext.request.contextPath}/static/client/images/12.gif"></a></div>
        <ul>
            <li><a href="http://localhost:8080/hjxy9/client/detail">通知公告通知公告通知公告通知公告通知公告通知公告通知公告通知公告</a><span>2017-02-23</span></li>
            <li><a href="http://localhost:8080/hjxy9/client/detail">通知公告通知公告通知公告通知公告通知公告通知公告通知公告通知公告</a><span>2017-02-23</span></li>
            <li><a href="http://localhost:8080/hjxy9/client/detail">通知公告通知公告通知公告通知公告通知公告通知公告通知公告通知公告</a><span>2017-02-23</span></li>
            <li><a href="http://localhost:8080/hjxy9/client/detail">通知公告通知公告通知公告通知公告通知公告通知公告通知公告通知公告</a><span>2017-02-23</span></li>
        </ul>
    </div>
</div>
<!-- index1-div2 -->
<div id="index1-div2" class="clearfix">
    <div class="index1-left675">
        <div class="index1-li-box">
            <div class="index1-left330">
                <div class="title-box">中心动态<a href="list-text1.html" class="title-more" title="查看更多"><img src="${pageContext.request.contextPath}/static/client/images/12.gif"></a></div>
                <img src="${pageContext.request.contextPath}/static/client/images/c1.jpg" style="width:330px; height:140px; margin:5px 0;">
                <ul>
                    <li><a href="http://localhost:8080/hjxy9/client/detail">中心动态中心动态中心动态中心动态中心动态中心动态中心动态中心动态</a><span>2017-02-23</span></li>
                    <li><a href="http://localhost:8080/hjxy9/client/detail">中心动态中心动态中心动态中心动态中心动态中心动态中心动态中心动态</a><span>2017-02-23</span></li>
                    <li><a href="http://localhost:8080/hjxy9/client/detail">中心动态中心动态中心动态中心动态中心动态中心动态中心动态中心动态</a><span>2017-02-23</span></li>
                    <li><a href="http://localhost:8080/hjxy9/client/detail">中心动态中心动态中心动态中心动态中心动态中心动态中心动态中心动态</a><span>2017-02-23</span></li>
                    <li><a href="http://localhost:8080/hjxy9/client/detail">中心动态中心动态中心动态中心动态中心动态中心动态中心动态中心动态</a><span>2017-02-23</span></li>
                </ul>
            </div>
            <div class="index1-right330">
                <div class="title-box">创新成果<a href="list-text1.html" class="title-more" title="查看更多"><img src="${pageContext.request.contextPath}/static/client/images/12.gif"></a></div>
                <img src="${pageContext.request.contextPath}/static/client/images/c2.jpg" style="width:330px; height:140px; margin:5px 0;">
                <ul>
                    <li><a href="http://localhost:8080/hjxy9/client/detail">创新成果创新成果创新成果创新成果创新成果创新成果创新成果创新成果</a><span>2017-02-23</span></li>
                    <li><a href="http://localhost:8080/hjxy9/client/detail">创新成果创新成果创新成果创新成果创新成果创新成果创新成果创新成果</a><span>2017-02-23</span></li>
                    <li><a href="http://localhost:8080/hjxy9/client/detail">创新成果创新成果创新成果创新成果创新成果创新成果创新成果创新成果</a><span>2017-02-23</span></li>
                    <li><a href="http://localhost:8080/hjxy9/client/detail">创新成果创新成果创新成果创新成果创新成果创新成果创新成果创新成果</a><span>2017-02-23</span></li>
                    <li><a href="http://localhost:8080/hjxy9/client/detail">创新成果创新成果创新成果创新成果创新成果创新成果创新成果创新成果</a><span>2017-02-23</span></li>
                </ul>
            </div>
        </div>
        <!-- slider -->
        <div class="index1-pic-gun">
            <div class="title-box">开设课程<a href="list-pic1.html" class="title-more" title="查看更多"><img src="${pageContext.request.contextPath}/static/client/images/12.gif"></a></div>
            <div class="index1-scrollleft clearfix">
                <ul>
                    <li>
                        <a href="http://localhost:8080/hjxy9/client/detail"><img alt="JavEE课程" src="${pageContext.request.contextPath}/static/client/images/a1.jpg"/></a>
                        <span>JavEE课程</span>
                    </li>
                    <li>
                        <a href="http://localhost:8080/hjxy9/client/detail"><img alt="嵌入式" src="${pageContext.request.contextPath}/static/client/images/a2.jpg"/></a>
                        <span>嵌入式</span>
                    </li>
                    <li>
                        <a href="http://localhost:8080/hjxy9/client/detail"><img alt="H5" src="${pageContext.request.contextPath}/static/client/images/a3.jpg"/></a>
                        <span>H5</span>
                    </li>
                    <li>
                        <a href="http://localhost:8080/hjxy9/client/detail"><img alt="大数据" src="${pageContext.request.contextPath}/static/client/images/a2.jpg"/></a>
                        <span>大数据</span>
                    </li>
                </ul>
            </div>
            <script type="text/javascript">
                $(document).ready(function(){

                    $(".index1-scrollleft").imgscroll({
                        speed: 40,    //图片滚动速度
                        amount: 0,    //图片滚动过渡时间
                        width: 1,     //图片滚动步数
                        dir: "left"   // "left" 或 "up" 向左或向上滚动
                    });

                });
            </script>
        </div>
        <!-- slider end -->
    </div>
    <div class="index1-right300">
        <div class="index1-login-box">
            <div class="title-box">学生登录</div>
            <form id="form1" name="form1" method="post">
                <input type="text" name="textfield2" id="username" placeholder="用户名" class="index1-uname">
                <input type="password" name="password" id="password" placeholder="密码" class="index1-upass">
                <div class="index1-t-link">
<%--                    <input type="checkbox" name="checkbox" id="checkbox" class="index1-chek">记住密码--%>
<%--                    <a href="forgetpass.html" target="_blank">忘记密码？</a>--%>
<%--                    <span id="infoSpan">{{result.message}}</span>--%>
                </div>
                <input type="button"  value="登录" onclick="clientLogin()" class="index1-input-login">
                <input type="button" name="button" id="button" value="取消" class="index1-input-but">
            </form>
        </div>
        <div class="index1-list-menu">
            <div class="title-box">网络课程</div>
            <ul>
                <li><a href="http://localhost:8080/hjxy9/client/detail">JavaEE课程</a></li>
                <li><a href="http://localhost:8080/hjxy9/client/detail">嵌入式</a></li>
                <li><a href="http://localhost:8080/hjxy9/client/detail">H5</a></li>
                <li><a href="http://localhost:8080/hjxy9/client/detail">大数据</a></li>
                <li><a href="http://localhost:8080/hjxy9/client/detail">全栈工程师</a></li>
            </ul>
        </div>
    </div>
</div>
<!-- div5 -->
<div id="div5" class="clearfix">
    <div class="link-box">
        <span>友情链接：</span>
        <select onChange="frlink(this)" name="select" class="select-link">
            <option selected>--- 教育类网站 ---</option>
            <option value="http://www.veryhuo.com">烈火网</option>
            <option value="http://www.sina.com.cn">新浪网</option>
            <option value="http://www.163.com">网易</option>
        </select>
        <select onChange="frlink(this)" name="select" class="select-link">
            <option selected>--- 政府类网站 ---</option>
            <option value="http://www.china.com">中华网</option>
            <option value="http://www.sina.com.cn">新浪网</option>
            <option value="http://www.163.com">网易</option>
        </select>
        <select onChange="frlink(this)" name="select" class="select-link">
            <option selected>--- 校园类网站 ---</option>
            <option value="http://www.veryhuo.com">烈火网</option>
            <option value="http://www.sina.com.cn">新浪网</option>
            <option value="http://www.163.com">网易</option>
        </select>
        <select onChange="frlink(this)" name="select" class="select-link">
            <option selected>--- 其它类网站 ---</option>
            <option value="http://www.veryhuo.com">烈火网</option>
            <option value="http://www.sina.com.cn">新浪网</option>
            <option value="http://www.163.com">网易</option>
        </select>
    </div>
</div>
<div id="div6"> &copy; 2020  皇家大学 </div>
<script>
    function clientLogin() {
        var usernameValue = $("#username").val;
        var passwordValue = $("#password").val;
        $.ajax({
            url:'${pageContext.request.contextPath}/client/login',
            type:'get',
            contentType:'application/x-www-form-urlencoded',
            data:{"username":usernameValue,"password":passwordValue}, //用户编辑后的数据
            dataType:'json',
            success:function (result) {
                // console.log(result.user);
                <%--if (result.code== 0){--%>
                <%--    window.location.href="${pageContext.request.contextPath}/user/getIndexView"--%>
                <%--}--%>
                // $("#infoSpan").html(result.message);
                window.location.href="http://localhost:8080/hjxy9/client/login";
                console.log(222);
            },
            error:function (err) {
                window.location.href="http://localhost:8080/hjxy9/client/login";
                console.log(111);
            }
        })
    }
</script>
</body>
</html>

